import request from '@/api/request'

// 统一返回为 { list: any[]; total: number }
export async function getDailySummary(userId:number, date: string) {
  return request<{ list: any[]; total: number }>({
    url: '/summaries/daily',
    method: 'GET',
    params: { userId, date },
  })
}

export async function getWeeklySummary(userId:number, week: string) {
  return request<{ list: any[]; total: number }>({
    url: '/summaries/weekly',
    method: 'GET',
    params: { userId, week },
  })
}

export async function getMonthlySummary(userId:number, month: string) {
  return request<{ list: any[]; total: number }>({
    url: '/summaries/monthly',
    method: 'GET',
    params: { userId, month },
  })
}
